import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"
import Layout from "@/layout/index.vue"
import childRoutes from "~pages"

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    children: childRoutes
  }
]

export default createRouter({
  history: createWebHistory(),
  routes: routes
})
